<template>
	<view class="userteam">
		<view class="teamlist">
			<!-- <leo-tree :data="treeData"></leo-tree> -->
			<mosowe-tree-list :treeData="treeData" text="title" children="children" :accordion="true">
			</mosowe-tree-list>
		</view>
	</view>
</template>

<script>
	import {
		getTeamTree
	} from "@/api/api.js"

	export default {
		data() {
			return {
				treeData: []
			}
		},
		onLoad() {
			this.getTeamTree()
		},
		methods: {
			getTeamTree() {
				getTeamTree().then(res => {
					if (res.code == 0) {
						this.treeData = res.data
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	uni-page-wrapper {}

	.userteam {
		.teamlist {
			border-radius: 5px;
			margin: 0 auto;
			overflow-x: scroll;
			padding: 0 10px;
			width: 96%;
			min-height: calc(100vh - 44px);
			height: 100%;
			box-sizing: border-box;
			white-space: nowrap;
			background: #f7f7f7;

			.team_item {
				display: flex;
				padding: 5%;
				display: flex;
				align-items: center;
				border-bottom: 1px solid #efefef;
				font-size: 14px;

				image {
					width: 100rpx;
					height: 100rpx;
					margin-right: 20rpx;
				}

				.userinfo {
					display: flex;
					flex-direction: column;
					flex: 4;
					font-weight: bold;
				}

				.level,
				.time_num {
					font-size: 12px;
					color: #777;
					font-weight: normal;
				}

				.time {
					display: flex;
					flex-direction: column;
					flex: 2;
				}
			}
		}
	}
</style>